import request from '@/utils/request'

// 查询身份证列表
export function listHouse(query) {
  return request({
    url: '/villagers/house/list',
    method: 'get',
    params: query
  })
}
// 查询已提交信息列表
export function listReviewHouse(query) {
  return request({
    url: '/villagers/review/list',
    method: 'get',
    params: query
  })
}



// 查询身份证详细
export function getHouse(houseId) {
  return request({
    url: '/villagers/house/' + houseId,
    method: 'get'
  })
}

// 新增身份证
export function addHouse(data) {
  return request({
    url: '/villagers/house',
    method: 'post',
    data: data
  })
}

// 修改身份证
export function updateHouse(data) {
  return request({
    url: '/villagers/house',
    method: 'put',
    data: data
  })
}

// 删除身份证
export function delHouse(houseId) {
  return request({
    url: '/villagers/house/' + houseId,
    method: 'delete'
  })
}

//提交申请
export function passHouse(houseId) {
  return request({
    url: '/villagers/house/review/' + houseId,
    method: 'put',
  })
}

//通过申请
export function passReviews(houseId) {
  return request({
    url: '/villagers/review/pass/' + houseId,
    method: 'put',
  })
}

//拒绝申请
export function failReviews(houseId) {
  return request({
    url: '/villagers/review/fail/' + houseId,
    method: 'put',
  })
}





